From 229bf34c66e6ff41be3abf98058c502b6448a3e2 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sun, 23 Nov 2025 10:45:27 +0100 Subject: [PATCH] [PATCH] Use dbus-run-session to run D-Bus tests instead of dbus-launch dbus-run-session spawns a session that gets terminated automatically after the execution of the command. It is a simpler way compared to dbus-launch, which relies on the X11 tolaunching (which would explain why it is not used on macOS, as the comment says). Hence, use dbus-run-session instead of dbus-launch to run each D-Bus test. Keep the existing macOS behaviour as-is for now, adding a comment to test using dbus-run-session in the future. Gbp-Pq: Name upstream_Use-dbus-run-session-to-run-D-Bus-tests-instead-of-d.patch --- tests/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a39863a..f6cfabd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -64,9 +64,10 @@ function(qcoro_add_dbus_test _name) target_compile_definitions(test-${_name} PRIVATE TESTDBUSSERVER_EXECUTABLE=\"$\") if (APPLE) # On MacOS dbus-launch doesn't work, so we rely on the session dbus running + # TODO: check whether dbus-run-session works add_test(NAME test-${_name} COMMAND test-${_name}) else() - add_test(NAME test-${_name} COMMAND dbus-launch $) + add_test(NAME test-${_name} COMMAND dbus-run-session $) endif() _enable_supressions(${_name}) endfunction() -- 2.30.2